package com.next.aap.server.controller;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CacheController extends BaseController{

	
	@RequestMapping(value="/cache/refresh/location", method = RequestMethod.GET)
    @ResponseBody
    public String refreshLocationCache(HttpServletResponse httpResponse){
		return locationCache.refreshCacheAsync();
	}
	
	@RequestMapping(value="/cache/refresh/candidate", method = RequestMethod.GET)
    @ResponseBody
    public String refreshCandidateCache(HttpServletResponse httpResponse){
		return candidateCache.refreshCacheAsync();
	}
	
	@RequestMapping(value="/cache/refresh/manifesto", method = RequestMethod.GET)
    @ResponseBody
    public String refreshManifestoCache(HttpServletResponse httpResponse){
		return manifestoCache.refreshCacheAsync();
	}

}
